(function($){
	/*jQuery.isCheck = function(){
		this.email = function(value) {
			reg = /^\w{3,}@\w+(\.\w+)+$/;
			if (!reg.test(value)) {
				return false;
			} else {
				return true;
			}
		}
		// 数字验证
		this.number = function(value) {
			reg = /^[a-z,A-Z]+$/;
			if (!reg.test(value)) {
				return false;
			} else {
				return true;
			}
		}
		// 电话号验证
		this.tel = function(value) {
			reg = /^(\d{3,4}\-)?[1-9]\d{6,7}$/;
			if (!reg.test(value)) {
				return false;
			} else {
				return true;
			}
		}
		// 手机号验证
		this.phone = function(value) {
			reg = /^(\+\d{2,3}\-)?\d{11}$/;
			if (!reg.test(value)) {
				return false;
			} else {
				return true;
			}
		}
		// 网址验证
		this.http = function(value) {
			reg = /^http:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/;
			if (!reg.test(value)) {
				return false;
			} else {
				return true;
			}
		}
		// 空验证
		this.empty = function(value) {
			if ($.trim(value) == '') {
				return false;
			} else {
				return true;
			}
		}
		// 货币验证
		this.price = function(value) {
			reg = /^\d+(.\d+)?$/;
			if (!reg.test(value)) {
				return false;
			} else {
				return true;
			}
		}
	}*/
	jQuery.AlertMsg = function(config){
		var defaults = {
			type: 'Success',
			msg: '',
			width: 200,
			height: 40,
			autoclose: true,
			autotime: 2
		};

		defaults = $.extend({}, defaults, config);

		var winWidth = $(window).width();
		var winHeight = $(window).height();
		var dialogTop = (winHeight - defaults.height)/2+$(document).scrollTop();
		var dialogLeft = (winWidth - defaults.width)/2;
		$('<div id="AlertMsg"><p class="'+ defaults.type +'">'+ defaults.msg +'</p></div>').appendTo('body');
		$("#AlertMsg").css({
			width:defaults.width,
			height: defaults.height,
			top:dialogTop,
			left:dialogLeft
		}).show();
		$('#AlertMsg').delay(defaults.autotime*1000).fadeIn("normal", function(){
			$(this).animate({
				opacity:.0,
				speed:2000,
				callback: function(){
					$('#AlertMsg').remove();
				}
			}).css({flter:"Alpha(Opacity=0)"});
		});
	}
})(jQuery);